package org.locker.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.locker.common.core.validate.AddGroup;
import org.locker.common.core.validate.EditGroup;
import org.locker.common.mybatis.core.domain.BaseEntity;
import org.locker.domain.DeviceVersion;

/**
 * 设备升级信息业务对象 lk_device_version
 *
 * @author winnie
 * @date 2023-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceVersion.class, reverseConvertGenerate = false)
public class DeviceVersionBo extends BaseEntity {

    /**
     * 设备ID
     */
    @NotNull(message = "设备ID不能为空", groups = {EditGroup.class})
    private Long deviceVersionId;

    /**
     * 版本名称
     */
    @NotBlank(message = "版本名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String versionName;

    /**
     * 版本号
     */
    @NotBlank(message = "版本号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String versionCode;

    /**
     * 文件地址
     */
    @NotBlank(message = "文件地址不能为空", groups = {AddGroup.class, EditGroup.class})
    private String fileUrl;

    /**
     * 文件MD5
     */
    private String fileMd5;

    /**
     * 最小升级版本
     */
    private String miniVersionCode;

    /**
     * 渠道号
     */
    @NotBlank(message = "渠道号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String fileChannel;

    /**
     * 备注说明
     */
    @NotBlank(message = "备注说明不能为空", groups = {AddGroup.class, EditGroup.class})
    private String remark;


    /**
     * 状态：open 开启，close  关闭
     */
    private String status;
}
